package com.codemart.lanze.modules.cms.service.impl;

import com.codemart.lanze.modules.cms.entity.Advert;
import com.codemart.lanze.modules.cms.mapper.AdvertMapper;
import com.codemart.lanze.modules.cms.service.IAdvertService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 广告
 * @Author: lanze
 * @Date:   2019-09-13
 * @Version: V1.0
 */
@Service
public class AdvertServiceImpl extends ServiceImpl<AdvertMapper, Advert> implements IAdvertService {

	public Advert findByName(String name) {
		QueryWrapper<Advert> ew = new QueryWrapper<>();
		ew.eq("name", name);
		return this.getOne(ew);
	}

}
